﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Truron.Purchase.Model.RemoteModel;
using Truron.Purchase.Utility;

namespace Truron.Purchase.Model
{
    [Serializable]
    [PrimaryKey("Id")]
    [Table("Purchase_OuterRequest")]
    public class Purchase_OuterRequest : BaseData
    {
        public string RequestNo { get; set; }
        public int OrderId { get; set; }
        public int UnitId { get; set; }
        public int FlowStatus { get; set; }
        public string OrderNo { get; set; }
        [NotMapped]
        public string UnitCode { get; set; }
        [NotMapped]
        public decimal UnitPrice { get; set; }
        [NotMapped]
        public string UnitScope { get; set; }
        [NotMapped]
        public int UnitNumber { get; set; }
        [NotMapped]
        public string OrderName { get; set; }
        [NotMapped]
        public string OrderCode { get; set; }
        [NotMapped]
        public int Auditer { get; set; }
        [NotMapped]
        public string AuditerName { get; set; }
        public void Create(UserCache userInfo)
        {
            this.CreateUser = userInfo.UserId;
            this.CreateTime = DateTime.Now;
        }
        public void Modify(UserCache userInfo)
        {
            this.LastUpdateUser = userInfo.UserId;
            this.LastUpdateTime = DateTime.Now;
        }
    }

    public class ReturnStatusModel
    {
        public int RequestDId { get; set; }
        public string RequestNo { get; set; }
        public int AuditorId { get; set; }
        public string NodeName { get; set; }
        public int FlowStatus { get; set; }
        public int OuterStatus { get; set; }
        public decimal ExpextMoney { get; set; }
        public decimal RealMoney { get; set; }
    }
}
